<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<script type="text/javascript" src="<c:url value='/static/js/web/preSaleOrder/detail.js' />"></script>

</head>
<body>
	<div class="p_page">
		<div class="top_tool" style="text-align: right;">
			<a class="text_a" href="<c:url value="/web/weixin/preSaleOrder/cars" />">返回购物车</a>
		</div>
		<form id="preSaleOrderForm" name="preSaleOrderForm" action="<c:url value='/web/preSaleOrder/save' />" method="post">
			<input type="hidden" name="goods" id="goods">
			<div class="order_detail">
				<div class="group">
					<!-- <label>姓名：</label> -->
					<div class="group-content input-name">
						<input type="text"  placeholder="请输入姓名" id="name" name="name" value="${constact.name }">
					</div>
				</div>
				<div class="group">
					<!-- <label>联系电话：</label> -->
					<div class="group-content input-mobile">
						<input type="text" placeholder="请输入手机号码" id="mobile" name="mobile" value="${constact.mobile }">
					</div>
				</div>
				<div class="group">
					<!-- <label>支付宝账号：</label> -->
					<div class="group-content input-alipayAccount">
						<input type="text" placeholder="请输入支付宝账号" id="alipayAccount" name="alipayAccount" value="${constact.alipayAccount }">
					</div>
				</div>
				<div class="group">
					<!-- <label>备注：</label> -->
					<div class="group-content input-memo">
						<input type="text" placeholder="请输入备注" id="memo" name="memo" value="${constact.memo }">
					</div>
				</div>
			</div>
		</form>
	</div>
	<hr/>
	<div class="p_page">
		<div class="order_detail_list">
			<div class="order_content">
				<div id="nullCars">
				<c:if test="${fn:length(products) == 0}">
					<div style="padding-top: 50px; text-align: center;">您的购物车空空如也~</div>
				</c:if>
				</div>
				<ul class="news-list">
					<c:forEach items="${products }" var="product">
						<li class="list-item" productId="${product.product.id }">
							<div class="item-image-box">
								<a href="<c:url value='/web/product/detail?id=${product.product.id }' />">
									<img src="<c:url value='${product.product.image1 }' />">
								</a>
							</div>
							<div class="item-info">
								<div class="title">
									<a href="<c:url value='/web/product/detail?id=${product.product.id }' />">${product.product.productName }</a>
								</div>
								<div class="price">
									<div class="price_stock">库存：<span class="stock">${product.product.stock}</span></div>
									<div class="price_unit">单价：<b class="red">￥<span class="unit-price">${product.buyPrice}</span></b></div>
								</div>
								<div class="number">
									<div style="float: left;">数量：</div>
									<div class="number_tool" style="float: left;">
										<div class="c_d c_subtract"></div>
										<div class="c_d c_number"><input class="buyCount" onblur="NumberInputKeyup(this,'${product.product.stock}')" onkeyup="NumberInputKeyup(this,'${product.product.stock}')" type="text" value="${product.buyCount}" /></div>
										<div class="c_d c_add"></div>
									</div>
									<div class="right_del" align="right">
										<a class="button bg-red cardel" style="font-size: 14px;margin-left: 10px;">删除</a>
									</div>
								</div>
							</div>
							<hr class="clear">
						</li>
					</c:forEach>
				</ul>
			</div>
		</div>
	</div>
	<div class="p_page">
		<div class="footer">
			<div class="center clear" style="text-align: right; padding-right: 10px;padding-left: 10px;">
				<div style="float: left;line-height: 15px;text-align: left;height: 40px;">
					<span class="red" style="font-size: 13px;">总金额：<b>￥<span id="totalPrice">${car.fullAmount }</span></b></span>
					<br/><span style="font-size: 12px;">(预付款：<b>￥<span id="should">${car.preAmount }</span></b>)</span>
				</div>
				<div style="float: right;">
					<a id="submitCar" href="javascript:void(0);" class="button bg-red">确定</a>
				</div>
			</div>
		</div>
	</div>
</body>
</html>